#!/bin/sh -e
if [ "$AVOCADO_PARALLEL_LINT_JOBS" ]; then
    PYLINT_OPTIONS="--jobs=$AVOCADO_PARALLEL_LINT_JOBS";
fi

PYLINT=$(which pylint-3 2>/dev/null || which pylint)

MODULES="avocado contrib examples scripts docs optional_plugins selftests"
${PYLINT} ${PYLINT_OPTIONS} --enable=R0401,W0101,W0102,W0104,W0105,W0106,W0107,W0108,W0109,W0111,W0120,W0122,W0123,W0124,W0125,W0143,W0150,W0199,W0201,W0211,W0221,W0222,W0223,W0231,W0232,W0233,W0235,W0301,W0311,W0312,W0401,W0402,W0404,W0406,W0410,W0601,W0602,W0603,W0604,W0611,W0612,W0613,W0614,W0621,W0622,W0623,W0631,W0640,W0702,W0705,W0706,W0711,W0715,W1113,W1201,W1202,W1300,W1301,W1302,W1303,W1304,W1305,W1306,W1307,W1401,W1402,W1501,W1503,W1505,W1509,W1645 ${MODULES}

MODULES="avocado contrib examples scripts docs optional_plugins"
${PYLINT} ${PYLINT_OPTIONS} --enable=W0212,W0703 ${MODULES}
